<template>
	<view>
		<u-navbar :is-back="true" :is-fixed="true" title="服务码"></u-navbar>
			<free-divider></free-divider>
			<view class="text-center py-5">
				<img src="/static/logo.png" style="width: 120px; height: 120px;" />
				<view class="py-3">崖州芒果 <text class="ml-3 text-8ED0F2">下载</text> </view>
			</view>
			<view class="lineHight-3" style="background-color:#EFEDE9;">
				<view class="pl-2 font-16">企业主体信息</view>
			</view>
			<u-form :model="form">
				<u-form-item :label-style="labelStyle" label="企业名称" >
					<u-input class="mr-3 " :disabled="true" v-model="form.enterpriseName" input-align="right" />
				</u-form-item>
				<u-form-item :label-style="labelStyle" label="负责人" >
					<u-input class="mr-3 " :disabled="true" v-model="form.legalRepresentative" input-align="right" />
				</u-form-item>
				<u-form-item :label-style="labelStyle" label="统一社会信用代码" >
					<u-input class="mr-3 " :disabled="true" v-model="form.unifiedCreditCode" input-align="right" />
				</u-form-item>
				<u-form-item :label-style="labelStyle" label="收购范围" >
					<u-input class="mr-3 " :disabled="true" v-model="form.buyScope" input-align="right" />
				</u-form-item>
				<u-form-item :label-style="labelStyle" label="主体地址" >
					<u-input class="mr-3 "  :disabled="true" v-model="form.address" input-align="right" />
				</u-form-item>
			</u-form>
	</view>
</template>

<script>
import $H from '@/common/free-lib/request.js';
	import $U from "@/common/free-lib/util.js";
	import freeDivider from "@/components/free-ui/free-divider.vue";
	export default {
		components: {
			freeDivider,
		},
		data() {
			return {
				form: {

				},

				labelStyle: {
					paddingLeft: '13px',
					width: '140px'
				},
				value: '',
				border: true,
				
			}
		},
		computed: {

		},
		onLoad(options) {
			this.getServiceCode();},
		methods: {
			getServiceCode(){
				const userId = $U.getStorage("id");
				if(!userId){
					uni.showToast({
							title: "请重新登录",
							icon: "error",
						});
				}
				uni.showLoading({
					title: "加载中",
					mask: true,
				})
				$H.get('/brand/user/upper/queryServiceCode',{id:userId}).then(res => {
					uni.hideLoading();
					if(res.success){
						this.form = res.result;
					}else{
						uni.showToast({
							title: res.message||"获取服务码失败",
							icon: "error",
						});
					}
				}).catch(err => {
					uni.hideLoading();
					uni.showToast({
						title: err.message||"获取服务码失败",
						icon: "error",
					});
				})

			}

		}
	}
</script>

<style>
</style>